-
Notifications
You must be signed in to change notification settings - Fork 910
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Factories refactor #1843
Factories refactor #1843
Conversation
+1 to the proposal. Additionally, I'd like to propose a (permissive) convention for directory/files organization.
This proposal goes against e.g. our current subnet factory where YaML path and filename are used to extract data, and would give developers freedom to implement multiple resources in a single file, or to use one file per resource, as they see fit. |
Yes, agreed with exceptions (the permissive bit you mentioned?), e.g. the cidr file in firewall rules.
I'm trying to think where we would need a list and failing, so +1.
Yep, again with exceptions like the cidr file.
It's a pattern I kind of like as it allows logical partitioning, and the same for firewall rules where logical partitioning might be useful. But then partitioning can happen at the file name level, and having a (loose) standard is better than having none, so +1. PS - firewall rules are split into ingress/egress blocks that mimick the variable, and that I would keep so n rules for 1 file Can you add those bits to the doc by editing this branch? |
Had the CIDR file in mind when I wrote this, but that doesn't compute as a factory to me. I'm actually having second thoughts on whether that should be a YaML at all vs a variable, but let's postpone/move this conversation.
On it |
Should we break this down into issues and start hammering our keyboards? |
Adding here a summary of what we discussed offline. There are 2 angles for the discussion related to factories:
I'll focus only on the second since I don't have much to add to the interface discussion. For scope, we see that there are generally two types of factories:
Currently we have the first type of factories in the So the plan would be that for factories that handle single resources, they should live directly under One of the challenges with having composing factories in FAST is that there is currently a (partly incorrect) assumption that FAST parts (stages) are always to be used to build an end-to-end landing zone, and not to be picked and used independently. One of the reasons for that is that not everything we call a FAST stage is actually a stage. While their folders have numbers suggesting a sequential implementation order, some of them are actually templates/blueprints that need to be customized to the customer to then be applied as one of the sequential stage. Take project factory for example. A project factory is a FAST stage (which needs to be applied after network and security stages since it expects their outputs as its input when used as a workload "platform engineering" factory, but is also a blueprint that can be used on its own outside of a FAST landing zone as long as its expected inputs are provided via the variable surface (or even in other FAST places like the sandbox stage). In fact, the fast project factory stage is actually a sample implementation for "dev" of the To make this distinction more clear (that these blueprints are a core part of FAST but can also be used on its own), we discussed moving these "template stages" under |
Thanks for capturing the earlier discussion Roberto. My only nit is on the new folder naming: |
Between |
* factories refactor doc * Adds file schema and filesystem organization * Update 20231106-factories.md * move factories out of blueprints and create new factories README * align factory in billing-account module * align factory in dataplex-datascan module * align factory in billing-account module * align factory in net-firewall-policy module * align factory in dns-response-policy module * align factory in net-vpc-firewall module * align factory in net-vpc module * align factory variable names in FAST * remove decentralized firewall blueprint * bump terraform version * bump module versions * update top-level READMEs * move project factory to modules * fix variable names and tests * tfdoc * remove changelog link * add project factory to top-level README * fix cludrun eventarc diff * fix README * fix cludrun eventarc diff --------- Co-authored-by: Simone Ruffilli <[email protected]>
This PR is the first step in the change of our approach to factories detailed in the ADR which is also part of this change.
In summary, this PR
pathexpand
to all factories